# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=deja-dup
pkgver=45.1
pkgrel=1
pkgdesc='A trivial-to-use personal backup tool to protect against accidental data loss'
arch=('loong64' 'x86_64')
url='https://wiki.gnome.org/Apps/DejaDup'
license=('GPL')
depends=(
  'duplicity'
  'gvfs'
  'libsecret'
  'org.freedesktop.secrets'
  'python-gobject'
  'python-pydrive2'
  'libadwaita'
)
makedepends=(
  'appstream-glib'
  'itstool'
  'meson'
  'vala'
)
source=("https://gitlab.gnome.org/World/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('5ca5f275a9b7dfef8087948dc18e49156872703afabc0b07d967f4c088cbe3ddaf86cf8e77cadbea9c13ec5675d7e81d68e350ea4cf6be9691fc7eb64e7e36b4')
b2sums=('ca836e8235375353a41b6eeb32f17af5cf956509bc15fd22d19e85941ed09d78c8cefd4daba57c1245216c081e1fbe355431a3c58bf66364f295bd7063332676')
validpgpkeys=('A3A5C2FC56AE7341D308D8571B50ECA373F3F233') # Michael Terry <mike@mterry.name>

prepare() {
  find "$pkgname-$pkgver" -name meson.build | xargs sed -e 's|C.UTF-8|C|' -i
}

build() {
  arch-meson "$pkgname-$pkgver" build
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}
